import myAxios from "./myAxios";
import { BASE_URL } from "../config";

export const reqLogin = (email, password) =>
  myAxios.post(`${BASE_URL}/api/auth/login`, { email, password });

export const reqCategoryList = () =>
  myAxios.get(`${BASE_URL}/my/article/cates`);

export const reqArtcate = () =>
  myAxios.get(`${BASE_URL}/my/article/cates/${1}`);

export const reqAddCatagory = (categoryName) => {
  myAxios.post(`${BASE_URL}/my/article/addcates`, { name: categoryName });
};

export const reqUpdateCatagory = (id, name) => {
  myAxios.post(`${BASE_URL}/my/article/updatecate`, { id, name });
};
